<?php /*a:2:{s:56:"D:\phpstudy_pro\yifei\muban\view\admin\cn\info\list.html";i:1755593437;s:48:"D:\phpstudy_pro\yifei\muban\view\admin\head.html";i:1755240736;}*/ ?>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>文档管理</title>
    <link rel="stylesheet" type="text/css" href="/static/admin/css/base.css">
<link rel="stylesheet" href="/static/admin/css/font.css">
<link rel="stylesheet" href="/static/admin/css/css.css">
<link rel="stylesheet" href="/static/admin/css/xadmin.css">
<link rel="stylesheet" href="/static/admin/css/image.css">
<script src="/static/admin/js/jquery.min.js"></script>
<script type="text/javascript" src="/static/admin/lib/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="/static/admin/js/xadmin.js"></script>
<script type="text/javascript" src="/static/admin/js/fl.js"></script>
<script src="/static/admin/js/falan.js"></script>
<script>var lang = "<?php echo htmlentities((string) $lang); ?>"</script>
</head>
<body leftmargin="8" topmargin="8" background='/static/images/allbg.gif'>
<div class="x-nav">
        <span class="layui-breadcrumb">
          <a href="">首页</a>
          <a href="">演示</a>
          <a>
            <cite>导航元素</cite></a>
        </span>
    <a class="layui-btn layui-btn-primary layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
        <i class="layui-icon" style="line-height:38px">ဂ</i></a>
</div>
<div class="x-body">
    <div class="layui-row">
        <form class="layui-form layui-col-md12 x-so">
            <input type="text" name="name"  placeholder="请输入标题" autocomplete="off" class="layui-input">
            <button class="layui-btn"  lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>
        </form>
    </div>
    <xblock>
        <!--<button class="layui-btn layui-btn-danger" onclick="delAll()"><i class="layui-icon"></i>批量删除</button>-->
        <!--<button class="layui-btn" onclick="x_admin_show('添加司机','/admin/siji?id=0')"><i class="layui-icon"></i>添加</button>-->
        <button class="layui-btn" onclick="x_admin_show('添加导航','/admin/info/info?id=0&lang=<?php echo htmlentities((string) $lang); ?>')">
            <i class="layui-icon"></i>添加
        </button>
        <span class="x-right" style="line-height:40px">共有数据：<?php echo htmlentities((string) $list->total()); ?>条</span>
    </xblock>
    <table class="layui-table">
        <thead>
        <tr>
            <th>文章标题</th>
            <th>文章封面</th>
            <th>归类</th>
            <!--<th>文章关键字</th>-->
            <th>文章简介</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <?php if(is_array($list) || $list instanceof \think\Collection || $list instanceof \think\Paginator): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$value): $mod = ($i % 2 );++$i;?>
        <tr>
            <td><?php echo htmlentities((string) $value['name']); ?></td>
            <td><img src="<?php echo htmlentities((string) $value['image']); ?>"></td>
            <td><?php echo htmlentities((string) $value['nav']['name']); ?></td>
            <td><?php echo htmlentities((string) $value['info']); ?></td>
            <td class="td-manage">
                <a title="修改"  onclick="x_admin_show('编辑','/admin/info/info?id=<?php echo htmlentities((string) $value['id']); ?>&lang=<?php echo htmlentities((string) $lang); ?>')" href="javascript:;">
                   修改
                </a>
                <a href="/info=<?php echo htmlentities((string) $value['url']); ?>" target="_blank">
                    查看
                </a>
                <a title="删除" onclick="member_del(this,'<?php echo htmlentities((string) $value['id']); ?>')" href="javascript:;">
                    删除
                </a>
            </td>
        </tr>
        <?php endforeach; endif; else: echo "" ;endif; ?>
        </tbody>
    </table>
    <div class="page"><?php echo $list; ?></div>
</div>
<script>
    /*删除*/
    function member_del(obj,id){
        layer.confirm('确认要删除吗？',function(index){
            //发异步删除数据
            $(obj).parents("tr").remove();
            post('/sys/nav/delete?id=' + id,{},'message');
            layer.msg('已删除!',{icon:1,time:1000});
        });
    }
    function message(){
        location.reload();
    }
</script>
</body>
</html>